package handlers

import (
	"github.com/gin-gonic/gin"
	"goods-master/cache"
	"goods-master/models"
)

func List(c *gin.Context) {
	var goods []models.Good

	redis_key := "good_list"
	cache.Rdb.Get(cache.Ctx, redis_key)
	models.DB.Find(&goods)
	c.JSON(200, gin.H{
		"code": 200,
		"msg":  "查询成功",
		"data": goods,
	})

}
